package com;

import com.mapper.UsersMapper;

import javax.net.ssl.HandshakeCompletedEvent;

public class UsersTest {
    @Test
    public <SqlSession, Users> void findUserTest() {
        HandshakeCompletedEvent MyBatisUtils = null;
        SqlSession sqlSession = (SqlSession) MyBatisUtils.getSession();
        Users users = sqlSession.selectOne("com.mapper.UsersMapper.findUserWithOrders", 1);
        System.out.println(users);
        sqlSession.close();
    }
    @Test
    public <SqlSession, Users> void selectUserByIdTest(){
        HandshakeCompletedEvent MyBatisUtils = null;
        SqlSession sqlSession = (SqlSession) MyBatisUtils.getSession();
        UsersMapper mapper = sqlSession.getMapper(UsersMapper.class);
        Users users = mapper.selectUserById(1);
        System.out.println(users);
        sqlSession.close();
    }
}
